package study.alex.resumedb.jdo;

import javax.jdo.annotations.*;
import java.util.HashSet;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * User: alex
 * Date: 07.11.13
 * Time: 12:07
 * SVN $Id$
 */

@PersistenceCapable (identityType=IdentityType.APPLICATION, detachable="true")
@Extension(vendorName="DataNucleus", key="mysql-engine-type", value="MyISAM")
public class Mine {

    @PrimaryKey
    @Persistent(valueStrategy= IdGeneratorStrategy.INCREMENT)
    private long id;

    @Persistent (defaultFetchGroup = "true")
    private Contact DefaultContact = null;

//    @Persistent (defaultFetchGroup = "true")
//    private resumeHistory history = new resumeHistory();

    public Mine (Contact aContact) {

        DefaultContact = aContact;

    }

    public Mine () {

        DefaultContact = new Contact();
    }

    public Contact getContact() {

        return DefaultContact;
    }

    public void setContact(Contact aContact) {

        if (aContact != null) {
            DefaultContact = new Contact(aContact);
        }
    }

//    public resumeHistory getHistory() {
//
//        return history;
//
//    }

}
